Image component prediction method and device, and computer storage medium

ABSTRACT

Colour component prediction method is provided, which includes that: first reference sample set corresponding to colour component to be predicted of coding block in video image is acquired; when available sample number in first reference sample set is less than preset number, preset component value is taken as predicted value corresponding to the colour component to be predicted; when available sample number in first reference sample set is not less than preset number, first reference sample set is screened to obtain second reference sample set; when available sample number in second reference sample set is equal to preset number, model parameter is determined through second reference sample set, and prediction model corresponding to colour component to be predicted is obtained based on model parameter, prediction model is used for prediction processing of colour component to be predicted to obtain predicted value corresponding to colour component to be predicted.

CROSS-REFERENCE TO RELATED APPLICATION

This is a continuation application of International Patent ApplicationNo. PCT/CN2019/092711, filed on Jun. 25, 2019, the contents of which arehereby incorporated by reference in their entirety.

BACKGROUND

With the increasing requirements of people for video display quality,new video application forms such as high-definition andultra-high-definition videos have emerged. Since H.265/High EfficiencyVideo Coding (HEVC) has been unable to meet the needs of rapiddevelopment of video applications, the Joint Video Exploration Team(JVET) proposed the next-generation video coding standardH.266/Versatile Video Coding (VVC), and its corresponding test model isa VVC reference software test model (VVC Test Model, VTM).

In VTM, a method for a colour component prediction based on a predictionmodel has been integrated at present, and via this prediction model, achroma component can be predicted from a luma component of a currentCoding Block (CB). However, when constructing the prediction model, dueto the difference in the number of neighbouring reference samples usedfor model parameter derivation, not only additional processing is added,but also the computational complexity is increased.

SUMMARY

Embodiments of this disclosure relates to the field of video coding anddecoding technologies, and in particular, to a method and device for acolour component prediction.

The technical solutions in the embodiments of this disclosure can beimplemented as follows.

According to a first aspect, the embodiments of this disclosure providea method for a colour component prediction, applied to decoder, whichincludes that:

a first reference sample set corresponding to a colour component to bepredicted of a coding block in a video picture is acquired;

when the number of available samples in the first reference sample setis equal to 0, a preset component value is taken as a prediction valuecorresponding to the colour component to be predicted;

when the number of the available samples in the first reference sampleset is greater than or equal to 4, the first reference sample set isprocessed to obtain a second reference sample set, where the number ofavailable samples in the second reference sample set is less than orequal to a preset number;

when the number of the available samples in the second reference sampleset is equal to the preset number, a model parameter is determinedthrough the second reference sample set, and a prediction modelcorresponding to the colour component to be predicted is obtainedaccording to the model parameter, where the prediction model is used toimplement prediction processing of the colour component to be predictedto obtain the prediction value corresponding to the colour component tobe predicted.

According to a second aspect, the embodiments of this disclosure providea method for a colour component prediction, applied to encoder, whichincludes that:

a first reference sample set corresponding to a colour component to bepredicted of a coding block in a video picture is acquired;

when the number of available samples in the first reference sample setis equal to 0, a preset component value is taken as a prediction valuecorresponding to the colour component to be predicted;

when the number of the available samples in the first reference sampleset is greater than or equal to 4, the first reference sample set isprocessed to obtain a second reference sample set, where the number ofavailable samples in the second reference sample set is less than orequal to a preset number;

when the number of the available samples in the second reference sampleset is equal to the preset number, a model parameter is determinedthrough the second reference sample set, and a prediction modelcorresponding to the colour component to be predicted is obtainedaccording to the model parameter, where the prediction model is used toimplement prediction processing of the colour component to be predictedto obtain the prediction value corresponding to the colour component tobe predicted.

According to a third aspect, the embodiments of this disclosure providea decoder, which includes a processor and a memory configured to store acomputer program capable of running on the processor, wherein theprocessor is configured to:

acquire a first reference sample set corresponding to a colour componentto be predicted of a coding block in a video picture;

take, when the number of available samples in the first reference sampleset is equal to 0, a preset component value as a prediction valuecorresponding to the colour component to be predicted;

process, when the number of the available samples in the first referencesample set is greater than or equal to 4, the first reference sample setto obtain a second reference sample set, where the number of availablesamples in the second reference sample set is less than or equal to thepreset number;

when the number of the available samples in the second reference sampleset is equal to the preset number, determine a model parameter throughthe second reference sample set, and obtain a prediction modelcorresponding to the colour component to be predicted according to themodel parameter, where the prediction model is used to implementprediction processing of the colour component to be predicted to obtainthe prediction value corresponding to the colour component to bepredicted.

According to a fouth aspect, the embodiments of this disclosure providean encoder, which includes a processor and a memory configured to storea computer program capable of running on the processor, wherein theprocessor is configured to:

acquire a first reference sample set corresponding to a colour componentto be predicted of a coding block in a video picture;

take, when the number of available samples in the first reference sampleset is equal to 0, a preset component value as a prediction valuecorresponding to the colour component to be predicted;

process, when the number of the available samples in the first referencesample set is greater than or equal to 4, the first reference sample setto obtain a second reference sample set, where the number of availablesamples in the second reference sample set is less than or equal to thepreset number;

when the number of the available samples in the second reference sampleset is equal to the preset number, determine a model parameter throughthe second reference sample set, and obtain a prediction modelcorresponding to the colour component to be predicted according to themodel parameter, where the prediction model is used to implementprediction processing of the colour component to be predicted to obtainthe prediction value corresponding to the colour component to bepredicted.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a schematic diagram of distribution of available neighbouringregions according to an embodiment of this disclosure.

FIG. 2 is a schematic diagram of distribution of selection regions inthree modes according to an embodiment of this disclosure.

FIG. 3 is a schematic composition diagram of a video coding systemaccording to an embodiment of this disclosure.

FIG. 4 is a schematic composition diagram of a video decoding systemaccording to an embodiment of this disclosure.

FIG. 5 is a schematic flowchart of a method for a colour componentprediction according to an embodiment of this disclosure.

FIG. 6A is a schematic structural diagram of neighbouring referencesample selection in an INTRA_LT_CCLM mode according to an embodiment ofthis disclosure.

FIG. 6B is a schematic structural diagram of neighbouring referencesample selection in an INTRA_L_CCLM mode according to an embodiment ofthis disclosure.

FIG. 6C is a schematic structural diagram of neighbouring referencesample selection in an INTRA_T_CCLM mode according to an embodiment ofthis disclosure.

FIG. 7 is a schematic flowchart of another method for colour componentprediction according to an embodiment of this disclosure.

FIG. 8A is a schematic structural diagram of generation of zeroavailable sample in an INTRA_LT_CCLM mode according to an embodiment ofthis disclosure.

FIG. 8B is a schematic structural diagram of generation of zeroavailable sample in an INTRA_L_ CCLM mode according to an embodiment ofthis disclosure.

FIG. 8C is a schematic structural diagram of generation of zeroavailable sample in an INTRA_T_CCLM mode according to an embodiment ofthis disclosure.

FIG. 9A is a schematic structural diagram of generation of two availablesamples in an INTRA_LT_CCLM mode according to an embodiment of thisdisclosure.

FIG. 9B is a schematic structural diagram of generation of two availablesamples in an INTRA_L_CCLM mode according to an embodiment of thisdisclosure.

FIG. 9C is a schematic structural diagram of generation of two availablesamples in an INTRA_T_CCLM mode according to an embodiment of thisdisclosure.

FIG. 10 is a schematic flowchart of model parameter derivation accordingto an embodiment of this disclosure.

FIG. 11 is a simplified schematic flowchart of model parameterderivation according to an embodiment of this disclosure.

FIG. 12 is a simplified schematic flowchart of another model parameterderivation according to an embodiment of this disclosure.

FIG. 13 is a schematic structural composition diagram of a colourcomponent prediction device according to an embodiment of thisdisclosure.

FIG. 14 is a schematic structural diagram of specific hardware of acolour component prediction device according to an embodiment of thisdisclosure.

FIG. 15 is a schematic structural composition diagram of an encoderaccording to an embodiment of this disclosure.

FIG. 16 is a schematic structural composition diagram of a decoderaccording to an embodiment of this disclosure.

DETAILED DESCRIPTION

In order to understand the characteristics and technical contents of theembodiments of this disclosure in more detail, the implementation of theembodiments of this disclosure is set forth in detail below withreference to the accompanying drawings, which are intended to be usedfor reference and illustration only, and are not intended to limit theembodiments of this disclosure.

In a video picture, a first colour component, a second colour component,and a third colour component are generally used to represent a codingblock. The three colour components are a luma component, a blue chromacomponent, and a red chroma component, respectively. Specifically, theluma component is usually represented by a symbol Y, the blue chromacomponent is usually represented by a symbol Cb or U, and the red chromacomponent is usually represented by a symbol Cr or V. In this way, thevideo picture can be represented in a YCbCr format or in a YUV format.

In the embodiments of this disclosure, the first colour component may bethe luma component, the second colour component may be the blue chromacomponent, and the third colour component may be the red chromacomponent. No specific limitation is made in the embodiments of thisdisclosure.

In a current video picture or video coding and decoding process, across-component prediction technology mainly includes a Cross-componentLinear Model Prediction (CCLM) mode and a Multi-Directional Linear ModelPrediction (MDLM) mode. Regardless of a model parameter derivedaccording to the CCLM mode or a model parameter derived according to theMDLM mode, a prediction model corresponding thereto can realizeprediction between colour components, such as prediction from the firstcolour component to the second colour component, the second colourcomponent to the first colour component, the first colour component tothe third colour component, the third colour component to the firstcolour component, the second colour component to the third colourcomponent, or the third colour component to the second colour component.

Taking the prediction from the first colour component to the secondcolour component as an example, in order to reduce the redundancybetween the first colour component and the second colour component, theCCLM mode is used in VVC. In this case, the first colour component andthe second colour component are the same coding block, that is, aprediction value of the second colour component is constructed accordingto a reconstructed value of the first colour component of the samecoding block, as represented by formula (1):

Pr ed_(C) [i,j]=α·Rec _(L) [i,j]+β  (1)

where i, j represents position coordinates of a sample in the codingblock, i represents a horizontal direction, j represents a verticaldirection, Pr ed_(C)[i, j] represents a prediction value of a secondcolour component corresponding to the sample whose position coordinatesare [i,j] in the coding block, Re c_(L) [i,j ] represents areconstructed value of a first colour component corresponding to thesample whose position coordinates are [i,j] in the same coding block(after down-sampling), and α and β represent model parameters.

For the coding block, neighbouring regions thereof may include a leftneighbouring region, a top neighbouring region, a bottom-leftneighbouring region, and a top-right neighbouring region. In VVC, threecross-component linear model prediction modes may be included, which area left neighbouring intra CCLM mode and top neighbouring intra CCLM mode(which can be represented by an INTRA_LT_CCLM mode), a left neighbouringintra CCLM mode and bottom-left neighbouring intra CCLM mode (which canbe represented by an INTRA_L_CCLM mode), and a top neighbouring intraCCLM mode and top-right neighbouring intra CCLM mode (which can berepresented by an INTRA_T_CCLM mode), respectively. In the three modes,a preset number (such as 4) of neighbouring reference samples can bechosen in each mode for the derivation of model parameters α and β. Thebiggest difference among the three modes is that selection regionscorresponding to the neighbouring reference samples for deriving themodel parameters α and β are different.

Specifically, for the size of the coding block corresponding to thesecond colour component to be W×H , it is assumed that the top selectionregion corresponding to the neighbouring reference sample is W′, and theleft selection region corresponding to the neighbouring reference sampleis H′. In this way,

for the INTRA_LT_CCLM mode, the neighbouring reference sample can beselected in the top neighbouring region and the left neighbouringregion, i.e., W′=W, and H′=H;

for the INTRA_L_CCLM mode, the neighbouring reference sample can beselected in the left neighbouring region and the bottom-leftneighbouring region, i.e., H′=W+H and let W′=0; and

for the INTRA_T_CCLM mode, the neighbouring reference sample can beselected in the top neighbouring region and the top-right neighbouringregion, i.e., W′=W+H, and let H′=0.

It is to be noted that in the latest VVC reference software VTM5.0, forthe top-right neighbouring region, only samples in a W range are storedat most, and for the bottom-left neighbouring region, only samples in anH range are stored at most. Therefore, although the range of theselection regions for the INTRA_L_CCLM mode and the INTRA_T_CCLM mode isdefined as W+H, in practical applications, the selection regions for theINTRA_L_CCLM mode are limited to H+H and the selection regions for theINTRA_T_CCLM mode are limited to W+W. In this way,

for the INTRA_L_CCLM mode, the neighbouring reference sample can beselected in the left neighbouring region and the bottom-leftneighbouring region, H′=min {W+H, H+H}; and

for the INTRA_T_CCLM mode, the neighbouring reference sample can beselected in the top neighbouring region and the top-right neighbouringregion, W′=min {W+H, W+W}.

Referring to FIG. 1, FIG. 1 is a schematic diagram of distribution ofavailable neighbouring regions according to an embodiment of thisdisclosure. In FIG. 1, the left neighbouring region, the bottom-leftneighbouring region, the top neighbouring region, and the top-rightneighbouring region are all available. On the basis of FIG. 1, theselection regions for the three modes are shown in FIG. 2. In FIG. 2,(a) represents that the selection regions for the INTRA_LT_CCLM mode,including the left neighbouring region and the top neighbouring region;(b) represents the selection regions for the INTRA_L_CCLM mode,including the left neighbouring region and the bottom-left neighbouringregion; (c) represents the selection regions for the INTRA_T_CCLM mode,including the top neighbouring region and the top-right neighbouringregion. In this way, after the selection regions for the three modes aredetermined, reference points for model parameter derivation can beselected in the selection regions. Thus, the selected reference pointscan be called neighbouring reference samples, and usually, the number ofthe neighbouring reference samples is at most 4. Moreover, for a codingblock having a determined size of W×H, the positions of the neighbouringreference samples thereof are generally determined.

However, for some special cases, such as an side case of the codingblock, an unpredictable case, and a case where a coding sequence leadsto an inability to acquire the neighbouring reference samples, and evenfor a case where the coding block is partitioned according to tiles andslices, neighbouring regions may also be unavailable, resulting in thatthe number of neighbouring reference samples selected from theneighbouring regions is less than 4. That is, only zero or twoneighbouring reference samples may be selected. As a result, the numberof the neighbouring reference samples used for model parameterderivation is not uniform, thus an additional “copy” operation is addedand the computational complexity is increased.

Without changing the coding and decoding prediction performance, inorder to reduce the computational complexity while unifying the modelparameter derivation processes, the embodiments of this disclosureprovide a method for a colour component prediction. A first referencesample set corresponding to a colour component to be predicted of acoding block in a video picture is acquired; when the number ofavailable samples in the first reference sample set is less than apreset number, a preset component value is taken as a prediction valuecorresponding to the colour component to be predicted; when the numberof the available samples in the first reference sample set is greaterthan or equal to the preset number, the first reference sample set isscreened to obtain a second reference sample set, where the number ofavailable samples in the second reference sample set is less than orequal to the preset number; when the number of the available samples inthe second reference sample set is less than the preset number, thepreset component value is taken as the prediction value corresponding tothe colour component to be predicted; and when the number of theavailable samples in the second reference sample set is equal to thepreset number, a model parameter is determined through the firstreference sample set, and a prediction model corresponding to the colourcomponent to be predicted is obtained according to the model parameter,where the prediction model is used to implement prediction processing ofthe colour component to be predicted to obtain the prediction valuecorresponding to the colour component to be predicted. In this way, forthe case where the number of the available samples in the firstreference sample set is less than the preset number or the number of theavailable samples in the second reference sample set is less than thepreset number, a CCLM mode is disabled, a preset default value isdirectly taken as the prediction value corresponding to the colourcomponent to be predicted. Because no additional processing module isadded, the computational complexity is also decreased. In addition, onlywhen the number of the available samples in the second reference sampleset is the preset number, the derivation of the model parameters isexecuted, that is, the CCLM mode is executed, thereby further unifyingthe model parameter derivation processes.

The following describes the embodiments of this disclosure in detailwith reference to the accompanying drawings.

Referring to FIG. 3, FIG. 3 shows an example of a composition diagram ofa video coding system according to an embodiment of this disclosure. Asshown in FIG. 3, the video coding system 300 includes a transform andquantization unit 301, an intra estimation unit 302, an intra predictionunit 303, a motion compensation unit 304, a motion estimation unit 305,an inverse transform and scaling unit 306, a filter control analysisunit 307, a filtering unit 308, a coding unit 309, and a decoded picturebuffer 310, etc. The filtering unit 308 can implement deblockingfiltering and Sample Adaptive Offset (SAO) filtering. The coding unit309 can implement header information coding and Context-based AdaptiveBinary Arithmatic Coding (CABAC). For an inputted original video signal,a video coding block can be obtained by partitioning a Coding Tree Unit(CTU), then residual sample information obtained after intra or interprediction is transformed by the transform and quantization unit 301 forthe video coding block, including transforming the residual informationfrom a sample domain to a transform domain, and the resulting transformcoefficients are quantized to further reduce a bit rate. The intraestimation unit 302 and the intra prediction unit 303 are configured toperform intra prediction on the video coding block. Specifically, theintra estimation unit 302 and the intra prediction unit 303 areconfigured to determine an intra prediction mode to be used to code thevideo coding block. The motion compensation unit 304 and the motionestimation unit 305 are configured to perform inter prediction coding ofthe received video coding block relative to one or more blocks in one ormore reference frames to provide time prediction information. The motionestimation performed by the motion estimation unit 305 is a process ofgenerating a motion vector. The motion vector may be used to estimatethe motion of the video coding block, and then the motion compensationunit 304 performs motion compensation based on the motion vectordetermined by the motion estimation unit 305. After determining theintra prediction mode, the intra prediction unit 303 is furtherconfigured to provide selected intra prediction data to the coding unit309, and the motion estimation unit 305 also sends the motion vectordata determined by calculation to the coding unit 309. In addition, theinverse transform and scaling unit 306 is configured to reconstruct thevideo coding block, and reconstruct a residual block in the sampledomain. The reconstructed residual block removes block effect artifactsthrough the filter control analysis unit 307 and the filtering unit 308.The reconstructed residual block is then added to a predictive block ina frame of the decoded picture buffer 310 to generate a reconstructedvideo coding block. The coding unit 309 is configured to code variouscoding parameters and quantized transform coefficients. In a CABAC-basedcoding algorithm, context content can be based on neighbouring codingblocks, and can be used to code information indicating the determinedintra prediction mode, and output a bitstream of the video signal.Moreover, the decoded picture buffer 310 is configured to store thereconstructed video coding block for prediction reference. As the videopicture coding progresses, new reconstructed video coding blocks will becontinuously generated. These reconstructed video coding blocks are allstored in the decoded picture buffer 310.

Referring to FIG. 4, FIG. 4 shows an example of a composition diagram ofa video decoding system according to an embodiment of this disclosure.As shown in FIG. 4, the video decoding system 400 includes a decodingunit 401, an inverse transform and scaling unit 402, an intra predictionunit 403, a motion compensation unit 404, a filtering unit 405, and adecoded picture buffer 406. The decoding unit 401 can implement headerinformation decoding and CABAC decoding. The filtering unit 405 canimplement deblocking filtering and SAO filtering. After an inputtedvideo signal undergoes the coding process in FIG. 2, a bitstream of thevideo signal is outputted. The bitstream is inputted into the videodecoding system 400, and first passes through the decoding unit 401 toobtain a decoded transform coefficient. The transform coefficient isprocessed by the inverse transform and scaling unit 402 to generate aresidual block in the sample domain. The intra prediction unit 403 canbe configured to generate prediction data of a current video decodingblock based on the determined intra prediction mode and data from thepreviously decoded block of a current frame or picture. The motioncompensation unit 404 determines the prediction information for thevideo decoding block by analyzing the motion vector and other associatedsyntax elements, and uses the prediction information to generate thepredictive block of the video decoding block being decoded. A decodedvideo block is formed by summing the residual block from the inversetransform and scaling unit 402 and the corresponding predictive blockgenerated by the intra prediction unit 403 or the motion compensationunit 404. The decoded video signal passes through the filtering unit 405in order to remove the block effect artifacts, which can improve thevideo quality. The decoded video block is then stored in the decodedpicture buffer 406. The decoded picture buffer 406 stores referencepictures used for subsequent intra prediction or motion compensation,and is also configured for the output of the video signal, so that therestored original video signal is obtained.

The colour component prediction method in the embodiments of thisdisclosure is mainly applied to the intra prediction unit 303 section asshown in FIG. 3 and the intra prediction unit 403 section as shown inFIG. 4, and is specifically applied to a CCLM prediction section inintra prediction. That is, the colour component prediction method in theembodiments of this disclosure can be applied to not only a video codingsystem but also a video decoding system, and can even be applied to boththe video coding system and the video decoding system. No specificlimitation is made in the embodiments of this disclosure. When thismethod is applied to the intra prediction unit 303 section, the “codingblock in the video picture” specifically refers to the current codingblock in the intra prediction. When this method is applied to the intraprediction unit 403 section, the “coding block in the video picture”specifically refers to the current decoding block in the intraprediction.

Based on the application scenario example in FIG. 3 or FIG. 4, referringto FIG. 5, FIG. 5 is a schematic flowchart of a method for a colourcomponent prediction according to an embodiment of this disclosure. Asshown in FIG. 5, the method may include the following operations.

At S501, a first reference sample set corresponding to a colourcomponent to be predicted of a coding block in a video picture isacquired.

It is to be noted that the video picture can be partitioned intomultiple coding blocks. Each coding block may include a first colourcomponent, a second colour component, and a third colour component. Thecoding block in the embodiments of this disclosure is a current block tobe coded in the video picture. When the first colour component needs tobe predicted through a prediction model, the colour component to bepredicted is the first colour component. When the second colourcomponent needs to be predicted through the prediction model, the colourcomponent to be predicted is the second colour component. When the thirdcolour component needs to be predicted through the prediction model, thecolour component to be predicted is the third colour component.

It is also to be noted that when the left neighbouring region, thebottom-left neighbouring region, the top neighbouring region, and thetop-right neighbouring region are all available regions, for theINTRA_LT_CCLM mode, the first reference sample set consists ofneighbouring reference samples in the left neighbouring region and thetop neighbouring region of the coding block, as shown in (a) of FIG. 2.For the INTRA_L_CCLM mode, the first reference sample set consists ofneighbouring reference samples in the left neighbouring region and thebottom-left neighbouring region of the coding block, as shown in (b) ofFIG. 2. For the INTRA_T_CCLM mode, the first reference sample setconsists of neighbouring reference samples in the top neighbouringregion and the top-right neighbouring region of the coding block, asshown in (c) of FIG. 2.

In some embodiments, optionally, for S501, acquiring the first referencesample set corresponding to the colour component to be predicted of thecoding block in the video picture may include the following operations.

At S501 a-1, reference samples neighboring at least one side of thecoding block are obtained. The at least one side includes a left side ofthe coding block and/or a top side of the coding block.

At S501 a-2, the first reference sample set corresponding to the colourcomponent to be predicted is formed based on the reference samples.

It is to be noted that the at least one side of the coding block mayinclude the left side of the coding block and the top side of the codingblock. That is, the at least one side of the coding block may refer tothe top side of the coding block or the left side of the coding block,and may even refer to the top side and the left side of the codingblock. No specific limitation is made in the embodiments of thisdisclosure.

Thus, for the INTRA_LT_CCLM mode, when the left neighbouring region andthe top neighbouring region are both available regions, the firstreference sample set may consist of reference samples neighboring theleft side of the coding block and reference samples neighboring the topside of the coding block. When the left neighbouring region is anavailable region while the top neighbouring region is an unavailableregion, the first reference sample set may consist of the referencesamples neighboring the left side of the coding block. When the leftneighbouring region is an unavailable region while the top neighbouringregion is an available region, the first reference sample set mayconsist of the reference samples neighboring the top side of the codingblock.

In some embodiments, optionally, for S501, acquiring the first referencesample set corresponding to the colour component to be predicted of thecoding block in the video picture may include the following operations.

At S501 b-1, reference samples in a reference row or a reference columnneighboring the coding block are acquired. The reference row consists ofa row neighboring the top side and a top-right side of the coding block,and the reference column consists of a column neighboring the left sideand a bottom-left side of the coding block.

At S501 b-2, the first reference sample set corresponding to the colourcomponent to be predicted is formed based on the reference samples.

It is to be noted that the reference row neighboring the coding blockmay consist of the row neighboring the top side and the top-right sideof the coding block, and the reference column neighboring the codingblock may consist of the column neighboring the left side and thebottom-left side of the coding block. The reference row or referencecolumn neighboring the coding block may refer to the reference rowneighboring the top side of the coding block or the reference columnneighboring the left side of the coding block, and may even refer to thereference row or reference column neighboring other sides of the codingblock. No specific limitation is made in the embodiments of thisdisclosure. For the ease of description, in the embodiments of thisdisclosure, the reference row neighboring the coding block is describedby taking the reference row neighboring the top side as an example, andthe reference column neighboring the coding block is described by takingthe reference column neighboring the left side as an example.

The reference samples in the reference row neighboring the coding blockmay include reference samples neighboring the top side and the top-rightside (also referred to as neighbouring reference samples correspondingto the top side and the top-right side). The top side represents the topside of the coding block, and the top-right side represents that the topside of the coding block horizontally extends to the right by an sidelength the same as the height of the current coding block. The referencesamples in the reference column neighboring the coding block may includereference samples neighboring the left side and the bottom-left side(also referred to as neighbouring reference samples corresponding to theleft side and the bottom-left side). The left side represents the leftside of the coding block, and the bottom-left side represents that theleft side of the coding block vertically extends downward by an sidelength the same as the height of the current decoding block. However, nospecific limitation is made in the embodiments of this disclosure.

Thus, for the INTRA_L_CCLM mode, when the left neighbouring region andthe bottom-left neighbouring region are both available regions, thefirst reference sample set may consist of the reference samples in thereference column neighboring the coding block. For the INTRA_T_CCLMmode, when the top neighbouring region and the top-right neighbouringregion are both available regions, the first reference sample set mayconsist of the reference samples in the reference row neighboring thecoding block.

At S502, when the number of available samples in the first referencesample set is less than a preset number, a preset component value istaken as a prediction value corresponding to the colour component to bepredicted.

It is to be noted that the number of the available samples can bedetermined based on the availableness of the neighbouring regions, andcan also be determined based on the number of the available samples inthe selection regions. For some special cases, such as an side case ofthe coding block, an unpredictable case, and a case where a codingsequence leads to an inability to obtain the neighbouring referencesamples, and even for a case where the coding block is partitionedaccording to tiles and slices, the left neighbouring region, thebottom-left neighbouring region, the top neighbouring region, and thetop-right neighbouring region are not all available regions, and theremay be an unavailable region, resulting in that the number of theavailable samples in the selection regions may be less than the presetnumber, so that the number of the available samples in the firstreference sample set is less than the preset number.

It is to be noted that the preset number is a preset judgment value ofthe number of the available samples, and is used to determine whether toexecute model parameter derivation and an operation of constructing aprediction model for the colour component to be predicted. The presetnumber may be 4. No specific limitation is made in the embodiments ofthis disclosure. In this way, assuming that the preset number is 4, thatis, when the number of the available samples in the first referencesample set is 0 or 2, the preset component value can be directly takenas the prediction value corresponding to the colour component to bepredicted, so as to reduce the computational complexity.

In addition, the preset component value is used to represent a presetfixed value corresponding to the colour component to be predicted (mayalso be referred to as a default value). The preset component value ismainly related to the bit information of the current video picture.Therefore, in some embodiments, for S502, when the number of theavailable samples in the first reference sample set is less than thepreset number, taking the preset component value as the prediction valuecorresponding to the colour component to be predicted may include thefollowing operations.

At S502 a, a preset component range corresponding to the colourcomponent to be predicted is determined based on bit information of thevideo picture.

At S502 b, an intermediate value of the preset component range isdetermined according to the preset component range, and the intermediatevalue is taken as the prediction value corresponding to the colourcomponent to be predicted, herein the intermediate value is expressed asthe preset component value.

It is to be noted that in the embodiments of this disclosure, theintermediate value of the preset component range corresponding to thecolour component to be predicted may be taken as the preset componentvalue, and then may be taken as the prediction value corresponding tothe colour component to be predicted. Assuming that a bit depth of thecolour component to be predicted is represented by BitDepthC, it can bederived that the calculation approach for the intermediate value of thecolour component to be predicted is 1<<(BitDepthC−1). The calculationapproach can be specifically set according to practical situations. Nospecific limitation is made in the embodiments of this disclosure.

Exemplarily, taking a chroma component as the colour component to bepredicted for an example, assuming that the current video picture is an8-bit video, the component range corresponding to the chroma componentis 0-255, and in this case, the intermediate value is 128, and thepreset component value may be 128, that is, the default value is 128.Assuming that the current video picture is a 10-bit video, the componentrange corresponding to the chroma component is 0-1023, and in this case,the intermediate value is 512, and the preset component value may be512, that is, the default value is 512. In the embodiments of thisdisclosure, the bit information of the video picture being 10 bits istaken as an example, that is, the preset component value is 512.

Further, in some embodiments, for S502, after taking the presetcomponent value as the prediction value corresponding to the colourcomponent to be predicted, the method may further include the followingoperation.

At S502 c, for each sample in the coding block, the preset componentvalue is used to perform prediction value filling on the colourcomponent to be predicted of each sample.

It is to be noted that for the case where the number of the availablesamples in the first reference sample set is less than the presetnumber, there is no need to add an additional processing module, thefixed default value is directly used to perform prediction value fillingon the colour component to be predicted in the coding block.

Exemplarily, assuming that the preset component value is 512, and thecolour component to be predicted is the chroma component, for a chromaprediction value corresponding to each sample in the coding block, 512may be directly used to fill the chroma prediction value.

At S503, when the number of the available samples in the first referencesample set is greater than or equal to the preset number, the firstreference sample set is screened to obtain a second reference sampleset.

It is to be noted that in the first reference sample set, there may besome unimportant reference samples (for example, these reference sampleshave poor correlation) or some abnormal reference samples. In order toensure the accuracy of the prediction model, these reference samplesneed to be eliminated, and thus the second reference sample set isobtained. The number of the available samples in the second referencesample set here is less than or equal to the preset number. For thenumber of the available samples included in the second reference sampleset, in practical applications, the preset number is generally chosen tobe 4. However, no specific limitation is made in the embodiments of thisdisclosure.

It is to be noted that when the number of the available samples in thefirst reference sample set is greater than or equal to the presetnumber, the first reference sample set may also be screened to obtainthe second reference sample set. After the second reference sample setis obtained, it is still necessary to make a judgment according to thenumber of the available samples in the second reference sample set andthe preset number. If the number of the available samples in the secondreference sample set is less than the preset number, the presetcomponent value may be taken as the prediction value corresponding tothe colour component to be predicted. If the number of the availablesamples in the second reference sample set is equal to the presetnumber, the model parameters can be derived according to the secondreference sample set.

Further, in some embodiments, for S503, screening the first referencesample set to obtain the second reference sample set may include thefollowing operation.

Positions of samples to be selected are determined based on samplepositions and/or colour component strengths corresponding toneighbouring reference samples in the first reference sample set; and

available samples corresponding to the positions of the samples to beselected are chosen from the first reference sample set according to thedetermined positions of samples to be selected, and the chosen availablesamples are combined into the second reference sample set, where thenumber of the available samples in the second reference sample set isless than or equal to the preset number.

Specifically, the first reference sample set may be screened accordingto positions of reference samples to be selected, and may also bescreened according to colour component strengths (such as a luma valueand a chroma value), so that the chosen reference samples to be selectedare combined into the second reference sample set. The following takesthe positions of the reference samples to be selected as an example fordescription.

Assuming that the number of available sample samples in the top regionand the top-right region neighboring the current coding block isnumSampT, and the number of available sample samples in the left regionand the bottom-left region neighboring the current coding block isnumSampL, the screening process is as follows (availT indicates theavailability of a top neighbouring row of the current coding block,availL indicates the availability of a left neighbouring column of thecurrent coding block, nTbW indicates the width of the current codingblock, and nTbH indicates the height of the current coding block):

If the intra prediction mode of the current block is the INTRA_LT_CCLMmode,

numSampT=availT?nTbW:0

numSampL=availL?nTbH:0

otherwise,

numSampT=(availT&&predModeIntra=INTRA_T_CCLM)?(nTbW+Min(num TopRight,nTbH)):0

numSampL=(availL&&predModeIntra=INTRA_L_CCLM)?(nTbH+Min(numL eftBelow,nTbW)):0

Here, numTopRight represents the number of available samples in atop-right nTbW range, and numLeftBelow represents the number ofavailable samples in a bottom-left nTbH range. The number of samplesscreened on each side is represented by cntN, the position of a startpoint is represented by startPosN, the selected point interval isrepresented by pickStepN, and the position of the sample to be selectedis represented by pickPosN[pos]. The derivation process is as follows:

variable numIs4N indicates whether to screen samples on only one side:

numIs4N=((availT&&availL&&predModeIntra=INTRA_LT_CCLM)?0:1)

variable startPosN indicates the position of the start point:

startPosN=numSampN>>(2+numIs4N)

variable pickStepN indicates the selected point interval:

pickStepN=Max(1, numSampN>>(1+numIs4N))

Here, N is replaced by T and L separately, which may respectivelyindicate that the samples are screened on the top and on the left, thatis, side N here represents side T or side L. If the availability availNof the side N is TRUE and the selected intra mode predModelntra is theINTRA_LT_CCLM mode or an INTRA_N_CCLM mode, the number cntN of thesamples screened on the side N and the positions pickPosN[pos] ofsamples to be selected are shown as follows (it is to be noted that thetotal number of the samples to be screened is cntT+cntL):

cntN=Min(numSampN, (1+numIs4N)<<1)

pickPosN[pos]=(startPosN+pos*pickStepN), with pos=0 . . . cntN−1

Otherwise, cntN is set to 0, that is, the number of the samples to bescreened is 0.

Assuming that the prediction sample of the current coding block ispredSamples[x][y] with x=0 . . . nTbW−1, y=0 . . . nTbH−1, thederivation thereof is as follows:

if both numSampL and numSampT are unavailable, the both are set to thedefault value, as shown below:

predSamples [x][y]=1<<(BitDepthc−1),

otherwise,

at a first step, a luma reconstruction sample pY[x][y] with x=0 . . .nTbW*2−1, y=0 . . . nTbH*2−1 of a collocated luma block is acquired.

At a second step, an neighbouring luma reconstruction sample pY[x][y] isacquired.

At a third step, a downsampling luma reconstruction sample pDsY[x][y]with x=0 . . . nTbW−1, y=0 . . . nTbH−1 is acquired.

At a fourth step, when numSampL is greater than 0, the chroma valuepSelC[idx] of a point selected on the left is set top[−1][pickPosL[idx]] with idx=0 . . . cntL−1, and a downsamplingreconstructed luma value pSelDsY[idx] with idx=0 . . . cntL−1 of thepoint selected on the left is acquired.

At a fifth step, when numSampT is greater than 0, the chroma valuepSelC[idx] of a point selected on the top is set top[pickPosT[idx-cntL]][−1] with idx=cntL . . . cntL+cntT−1, and adownsampling reconstructed luma value pSelDsY[idx] with idx=0 . . .cntL+cntT−1 of the point selected on the top is acquired.

At a sixth step, when cntT+cntL is not equal to 0, the variables minY,maxY, and minC and maxC are derived as follows:

when cntT+cntL is equal to 2, pSelComp[3] is set to pSelComp[0],pSelComp[2] is set to pSelComp[1], pSelComp[0] is set to pSelComp[1],and pSelComp[1] is set to pSelComp[3]. Here, Comp is replaced by DsY andC separately to represent the reconstructed luma and reconstructedchroma of the selected neighbouring sample.

The arrays minGrpIdx and maxGrpIdx are derived as follows:

minGrpIdx[0]=0

minGrpIdx[1]=2

maxGrpIdx[0]=1

maxGrpIdx[1]=3

When pSelDsY[minGrpIdx[0]] is greater than pSelDsY[minGrpIdx[1]],minGrpIdx[0] and minGrpIdx[1] are exchanged,

(minGrpIdx[0], minGrpIdx[1])=Swap(minGrpIdx[0], minGrpIdx[1])

when pSelDsY[maxGrpIdx[0]] is greater than pSelDsY[maxGrpIdx[1]],maxGrpIdx[0] and maxGrpIdx[1] are exchanged,

(maxGrpIdx[0], maxGrpIdx[1])=Swap(maxGrpIdx[0],maxGrpIdx[1])

when pSelDsY[minGrpIdx[0]] is greater than pSelDsY[maxGrpIdx[1]], thearrays minGrpIdx and maxGrpIdx are exchanged,

(minGrpIdx, maxGrpIdx)=Swap(minGrpIdx, maxGrpIdx)

when pSelDsY[minGrpIdx[1]] is greater than pSelDsY[maxGrpIdx[0]],minGrpIdx[1] and maxGrpIdx[0] are exchanged:

(minGrpIdx[1], maxGrpIdx[0])=Swap(minGrpIdx[1], maxGrpIdx[0])

The variables maxY, maxC, minY, and minC are calculated as follows(which represent an average value of the two groups, respectively):

maxY=(pSelDsY[maxGrpIdx[0]]+pSelDsY[maxGrpIdx[1]]+1)>>1

maxC=(pSelC[maxGrpIdx[0]]+pSelC[maxGrpIdx[1]]+1)>>1

minY=(pSelDsY[minGrpIdx[0]]+pSelDsY[minGrpIdx[1]]+1)>>1

minC=(pSelC[minGrpIdx[0]]+pSelC[minGrpIdx[1]]+1)>>1

At a seventh step, the derivation process of the linear model parametersa, b, and k is as follows (here, a is a slope (the ratio of thedifference in chroma to the difference in luma), b is an intercept, andk is the shift of a, and a is stored as an integer):

when numSampL is equal to 0, and numSampT is equal to 0,

k=0

a=0

b=1<<(BitDepth_(c)−1)

otherwise,

diff=maxY−minY

If diff is not equal to 0,

diffC=maxC−minC

x=Floor(Log2(diff))

normDiff=((diff<<4)>>x)&15

x+=(normDiff!=0)?1:0

y=Floor(Log2(Abs(diffC)))+1

a=(diffC*(divSigTable[normDiff]|8)+2^(y−1))>>y

k=((3+x−y)<1)?1:3+x−y

a=((3+x−y)<1)? Sign(a)*15:a

b=minC−((a*minY)>>k)

where divSigTable[ ] is divSigTable[ ]={0,7,6,5,5,4,4,3,3,2,2,1,1,1,1,0}

otherwise (when diff is equal to 0),

k=0

a=0

b=minC

At an eighth step, the chroma prediction sample predSamples[x][y] withx=0 . . . nTbW−1, y=0 . . . nTbH−1 is obtained according to thefollowing calculation (where Clip1C limits the prediction value to0-1023):

predSamples[x][y]=Clip1C(((pDsY[x][y]*a)>>k)+b)

For example, screening four neighbouring reference picture samples istaken as an example for description. It is assumed that the positions ofthe reference samples in the top selection region W′ are S[0, −1], . . ., S[W′−1, −1], and the positions of the reference samples in the leftselection region H′ are S[−1, 0], . . . , S [−1,H′−1] In this way, thescreening approach for selecting at most four neighbouring referencesamples is as follows:

For the INTRA_LT_CCLM mode, when both the top neighbouring region andthe left neighbouring region are available, two neighbouring referencesamples to be selected can be chosen in the top selection region W′, andthe corresponding positions thereof are S [W′/4, −1] and S [3W′/4, −1],respectively. Two neighbouring reference samples to be selected can bechosen in the left selection region H′, and the corresponding positionsthereof are S[−1,H′/4] and S [−1,3H′/4] respectively. The fourneighbouring reference samples to be selected are combined into thesecond reference sample set, as shown in FIG. 6A. In FIG. 6A, both theleft neighbouring region and the top neighbouring region of the codingblock are available. Moreover, in order to maintain the luma componentand the chroma component to have the same resolution, it is alsonecessary to down-sample the luma component, so that the downsamplingluma component has the same resolution as the chroma component.

For the INTRA_L_CCLM mode, when only the left neighbouring region andthe bottom-left neighbouring region are available, four neighbouringreference samples to be selected can be chosen in the left selectionregion H′, and the corresponding positions thereof are S[−1,H′/8],S[−1,3H′/8], S[−1,5H′/8], and S[−1,7H′/8], respectively. The fourneighbouring reference samples to be selected are combined into thesecond reference sample set, as shown in FIG. 6B. In FIG. 6B, both theleft neighbouring region and the bottom-left neighbouring region of thecoding block are available. Moreover, in order to maintain the lumacomponent and the chroma component to have the same resolution, it isstill necessary to down-sample the luma component, so that thedownsampling luma component has the same resolution as the chromacomponent.

For the INTRA_T_CCLM mode, when only the top neighbouring region and thetop-right neighbouring region are available, four neighbouring referencesamples to be selected can be chosen in the top selection region W′, andthe corresponding positions thereof are S[W′/8, −1], S[3W′/8,−1],S[5W′/8, −1], and S[7W′/8, −1] respectively. The four neighbouringreference samples to be selected are combined into the second referencesample set, as shown in FIG. 6C. In FIG. 6C, both the top neighbouringregion and the top-right neighbouring region of the coding block areavailable. Moreover, in order to maintain the luma component and thechroma component to have the same resolution, it is still necessary todown-sample the luma component, so that the downsampling luma componenthas the same resolution as the chroma component.

In this way, for the case where the number of the available samples inthe first reference sample set is greater than or equal to the presetnumber, by screening the first reference sample set, the secondreference sample set can be obtained, and the second reference sampleset includes four available samples.

At S504, when the number of the available samples in the secondreference sample set is less than the preset number, the presetcomponent value is taken as the prediction value corresponding to thecolour component to be predicted.

At S505, when the number of the available samples in the secondreference sample set is equal to the preset number, a model parameter isdetermined through the second reference sample set, and a predictionmodel corresponding to the colour component to be predicted is obtainedaccording to the model parameter.

It is to be noted that the second reference sample set is obtained afterscreening the first reference sample set. The number of the availablesamples in the second reference sample set may be less than the presetnumber, and may also be greater than or equal to the preset number. Ifthe number of the available samples in the second reference sample setis less than the preset number, the preset component value is directlytaken as the prediction value corresponding to the colour component tobe predicted. If the number of the available samples in the secondreference sample set is greater than or equal to the preset number, themodel parameter is determined through the second reference sample set,and the prediction model corresponding to the colour component to bepredicted is obtained according to the model parameter. It is to benoted that, since the reference samples used in model parameterderivation are generally 4, the number of the available samples of thesecond reference sample set obtained after the screening is either lessthan the preset number (the second reference sample set includes lessthan four available samples) or equal to the preset number (the secondreference sample set includes four available samples).

It is to be noted that the prediction model may be a linear model or anonlinear model. The nonlinear model may be a non-linear form such as aquadratic curve; or a non-linear form consisting of multiple linearmodels, such as a Multiple Model CCLM (MMLM) cross-component predictiontechnology, which is the nonlinear form consisting of multiple linearmodels. No specific limitation is made in the embodiments of thisdisclosure. The prediction model can be used to implement the predictionprocessing of the colour component to be predicted to obtain theprediction value corresponding to the colour component to be predicted.

After the second reference sample set is obtained, if the number of theavailable samples in the second reference sample set is equal to thepreset number, the model parameter can be determined according to thesecond reference sample set. After the model parameter is derived, theprediction model corresponding to the chroma component can also beobtained according to the model parameter, as shown in formula (1).Then, the prediction model is used to perform prediction processing onthe chroma component so as to obtain the prediction value correspondingto the chroma component.

Further, in some embodiments, for S505, after obtaining the predictionmodel corresponding to the colour component to be predicted according tothe model parameter, the method may further include the followingoperations.

Prediction processing is performed on the colour component to bepredicted of each sample in the coding block based on the predictionmodel, to obtain the prediction value corresponding to the colourcomponent to be predicted of each sample.

It is to be noted that for the case where the number of the availablesamples in the first reference sample set is greater than or equal tothe preset number, it is necessary to determine model parameters (suchas α and β) through the first reference sample set, and then obtain theprediction model corresponding to the colour component to be predictedaccording to the model parameters, so as to obtain the prediction valuecorresponding to the colour component to be predicted of each sample inthe coding block. For example, assuming that the colour component to bepredicted is the chroma component, the prediction model corresponding tothe chroma component as represented by formula (1) can be obtainedaccording to the model parameters α and β. Then, prediction processingis performed on the chroma component of each sample in the coding blockby using the prediction model represented by formula (1), so that theprediction value corresponding to the chroma component of each samplecan be obtained.

In the embodiments of this disclosure, for the left neighbouring region,the bottom-left neighbouring region, the top neighbouring region, andthe top-right neighbouring region, there may be available regions, andmay also be unavailable regions, resulting in that the number of theavailable samples selected from the neighbouring regions may be lessthan the preset number. Therefore, in some embodiments, referring toFIG. 7, FIG. 7 is a schematic flowchart of another method for a colourcomponent prediction according to an embodiment of this disclosure. Asshown in FIG. 7, after S501, the method may further include thefollowing operation.

At S701, the number of the available samples in the first referencesample set is determined, and whether the number of the availablesamples is less than the preset number is judged.

Further, after S503, the method may further include the followingoperation.

At S702, whether the number of the available samples in the secondreference sample set is less than the preset number is judged.

It is to be noted that the number of the available samples can bedetermined based on a judgement of the availableness of the neighbouringregions. In this way, after the number of the available samples isdetermined, by comparing the number of the available samples with thepreset number, when the number of the available samples in the firstreference sample set is less than the preset number, operation S502 isexecuted. When the number of the available samples in the secondreference sample set is less than the preset number, operation S504 isexecuted. When the number of the available samples in the secondreference sample set is greater than or equal to the preset number,operation S505 is executed.

It is also to be noted that the preset number may be 4. The followingdescribes in detail an example in which the preset number is equal to 4.

In a possible implementation, when the number of the available samplesin the first reference sample set is greater than or equal to the presetnumber, because the reference samples used in the model parameterderivation is generally 4, the first reference sample set can also bescreened first, so that the number of the available samples in the firstreference sample set is 4. Then, the model parameters are derivedaccording to the four available samples, and the prediction modelcorresponding to the colour component to be predicted is obtainedaccording to the model parameters, so as to obtain the prediction valuecorresponding to the colour component to be predicted.

Specifically, it is assumed that the colour component to be predicted isa chroma component, and the chroma component is predicted through a lumacomponent. It is assumed that the four available samples chosen byscreening are numbered 0, 1, 2, and 3, respectively. By comparing thefour chosen available samples, based on four comparisons, two sampleshaving larger luma values (which may include a sample having the largestluma value and a sample having the second largest luma value) and twosamples having smaller luma values (which may include a sample havingthe smallest luma value and a sample having the second smallest lumavalue) can further be selected. Furthermore, two arrays minIdx[2] andmaxIdx[2] can be set to store the two groups of samples respectively.Initially, the available samples numbered 0 and 2 are first put intominIdx[2], and the available samples numbered 1 and 3 are put intomaxIdx[2], as shown below:

Init: minIdx[2]={0, 2}, maxIdx[2]={1, 3}

After this, through four comparisons, the two samples having smallerluma values can be stored in minIdx[2], and the two samples havinglarger luma values can be stored in maxIdx[2]. The details are shown asfollows.

Step1: if(L[minIdx[0]]>L[minIdx[1]], swap(minIdx[0], minIdx[1])

Step2: if(L[maxIdx[0]]>L[maxIdx[1]], swap(maxIdx[0], maxIdx[1])

Step3: if(L[minIdx[0]]>L[maxIdx[1]], swap(minIdx, maxIdx)

Step4: if(L[minIdx[1]]>L[maxIdx[0]], swap(minIdx[1], maxIdx[0])

In this way, two samples having smaller luma values can be obtained, thecorresponding luma values thereof are respectively represented by luma⁰_(min) and luma¹ _(min), and the corresponding chroma values arerespectively represented by chroma⁰ _(min) and chroma¹ _(min), Inaddition, two samples having larger luma values can also be obtained,the corresponding luma values thereof are respectively represented byluma⁰ _(max) and luma¹ _(max), and the corresponding chroma values arerespectively represented by chroma⁰ _(max) and chroma¹ _(max). Further,by calculating an average value of the luma values corresponding to thetwo samples having smaller values, a luma value corresponding to a firstaverage point can be obtained and represented by luma_(min). Bycalculating an average value of the luma values corresponding to the twosamples having larger values, a luma value corresponding to a secondaverage point can be obtained and represented by luma_(max). Similarly,chroma values corresponding to the two average points can also beobtained and respectively represented by chroma_(min) and chroma_(max).The details are shown as follows:

luma_(min)=(luma⁰ _(min)+luma¹ _(min)+1)>>1

luma_(max)=(luma⁰ _(max)+luma₁ ^(max)+1)>>1

chroma_(min)=(chroma⁰ _(min)+chroma¹ _(min)+1)>>1

chroma_(max)=(chroma⁰ _(max)+chroma¹ _(max)+1)>>1

That is, after the two average points (luma_(min), chroma_(min)) and(luma_(max), chroma_(max)) are obtained, the model parameters can beobtained from the two points through a calculation approach of “twopoints determine a straight line”. Specially, the model parameters α andβ can be calculated according to formula (2),

$\begin{matrix}\left\{ \begin{matrix}{\alpha = \frac{{chroma_{\min}} - {chroma_{\min}}}{{luma_{\max}} - {luma_{\min}}}} \\{\beta = {{chroma_{\min}} - {\alpha \times luma_{\min}}}}\end{matrix} \right. & (2)\end{matrix}$

The model parameter α is a slope in the prediction model, and the modelparameter β is an intercept in the prediction model. In this way, afterthe model parameters are derived, the prediction model corresponding tothe chroma component can be obtained according to the model parameters,as shown in formula (1). Then, the prediction model is used to performprediction processing on the chroma component so as to obtain theprediction value corresponding to the chroma component.

In another possible implementation, for some special cases, such as anside case of the coding block, an unpredictable case, and a case where acoding sequence leads to an inability to obtain the neighbouringreference samples, and even for a case where the coding block ispartitioned according to tiles and slices, the left neighbouring region,the bottom-left neighbouring region, the top neighbouring region, andthe top-right neighbouring region are not all available regions, andthere may be an unavailable region, resulting in that the number of theavailable samples in the first reference sample set is less than thepreset number.

Thus, since the preset number is 4, in some embodiments, for S502, whenthe number of the available samples in the first reference sample set isless than the preset number, taking the preset component value as theprediction value corresponding to the colour component to be predictedmay include the following operation.

When the number of the available samples in the first reference sampleset is 0 or 2, the preset component value is taken as the predictionvalue corresponding to the colour component to be predicted.

In some embodiments, for S504, when the number of the available samplesin the second reference sample set is less than the preset number,taking the preset component value as the prediction value correspondingto the colour component to be predicted may include following operation.

When the number of the available samples in the second reference sampleset is 0 or 2, the preset component value is taken as the predictionvalue corresponding to the colour component to be predicted.

That is, when the preset number is 4, regardless of the case where thenumber of the available samples in the first reference sample set isless than the preset number, or the case where the number of theavailable samples in the second reference sample set is less than thepreset number, the number of the available samples is 0 or 2.

Specifically, when the total number of the neighbouring referencesamples in the selection region used by the coding block is 0, zeroavailable sample is selected at this time. In the following threespecial cases, zero available sample is obtained.

In the first case, for the INTRA_LT_CCLM mode, when both the topneighbouring region and the left neighbouring region are unavailable,the selection regions meet W′=H′=0, as shown in FIG. 8A. In FIG. 8A, theregion filled with gray slashes indicates the unavailable region.

In the second case, for the INTRA_L_CCLM mode, when both the leftneighbouring region and the bottom-left neighbouring region areunavailable, the selection regions meet H′=0, as shown in FIG. 8B. InFIG. 8B, the region filled with gray slashes indicates the unavailableregion.

In the third case, for the INTRA_T_CCLM mode, when both the topneighbouring region and the top-right neighbouring region areunavailable, the selection regions meet W′=0 as shown in FIG. 8C. InFIG. 8C, the region filled with gray slashes indicates the unavailableregion.

It is to be noted that the number of the available samples which is 0 isjudged according to the availableness of the neighbouring regions. Thatis, the number of the available samples in the first reference sampleset can be determined according to the availableness of the neighbouringregions. When the number of the available samples is 0, the modelparameter α may be set to 0, and the model parameter β may be set to thepreset component value corresponding to the colour component to bepredicted.

Assuming that the colour component to be predicted is a chromacomponent, the prediction values Pred_(C) [i, j] corresponding to thechroma components of all samples in the current coding block can befilled with the preset component value, i.e., the default value of thechroma components. In the embodiments of this disclosure, the defaultvalue is an intermediate value of the chroma components. Exemplarily,assuming that the current video picture is an 8-bit video, the componentrange corresponding to the chroma component is 0-255, and in this case,the intermediate value is 128, and the preset component value may be128. Assuming that the current video picture is a 10-bit video, thecomponent range corresponding to the chroma component is 0-1023, and inthis case, the intermediate value is 512, and the preset component valuemay be 512.

Specifically, when the total number of the neighbouring referencesamples in the selection regions used by the coding block is 2, twoavailable samples are selected at this time. Still assuming that thesize of the coding block is W×H, this case can only occur for a 2×N orN×2 coding block. The latest VVC reference software VTM5.0 limits thedivision of 2×2, 2×4 and 4×2 coding blocks, that is, in the coding blockdivision of a video picture, there are no coding blocks of the threesizes. Therefore, the value of N generally meets N>8. Two availablesamples are obtained in the following three special cases.

In the first case, for the INTRA_LT_CCLM mode, and for the 2×N or N×2coding block (N≥8), when the neighbouring region on the side having anside length of 2 is available while the neighbouring region on the sidehaving an side length of N is unavailable, the selection regions meetW′=2 and H′=0, or W′=0 and H′=2 as shown in FIG. 9A. In FIG. 9A, theregion filled with gray slashes indicates the unavailable region, andthe region filled with solid gray color indicates the available region.

In the second case, for the INTRA_L_CCLM mode, and for the N×2 codingblock (N≥8), when the left neighbouring region having an side length of2 is available and the bottom-left neighbouring region is unavailable,the selection regions meet H′=2, as shown in FIG. 9B. In FIG. 9B, theregion filled with gray slashes indicates the unavailable region, andthe region filled with solid gray color indicates the available region.

In the third case, for the INTRA_T_CCLM mode, and for the 2×N codingblock (N≥8), when the top neighbouring region having an side length of 2is available and the top-right neighbouring region is unavailable, theselection regions meet W′=2, as shown in FIG. 9C. In FIG. 9C, the regionfilled with gray slashes indicates the unavailable region, and theregion filled with solid gray color indicates the available region.

It is also to be noted that the number of the available samples which is2 can be determined based on the judgement of the availableness of theneighbouring regions, can also be determined based on the number of theavailable samples in the selection regions, and can also be determinedaccording to other judgment conditions. No specific limitation is madein the embodiments of this disclosure. In this way, the number of theavailable samples in the first reference sample set can be determinedaccording to the availableness of the neighbouring regions.

In the solutions of the prior art, for the case where there are twoavailable samples, it is necessary to copy the two available samples toobtain 4 samples. Exemplarily, assuming that the four samples arenumbered 0, 1, 2, and 3, number 0 represents the second available samplechosen, number 1 represents the first available sample chosen, number 2represents the second available sample chosen, and number 3 representsthe first available sample chosen. Then, the model parameters α and βcan be determined according to the four samples numbered 0, 1, 2, and 3,thereby establishing the prediction model as represented by formula (1).The prediction value corresponding to the colour component to bepredicted can be obtained through the prediction model.

In the embodiments of this disclosure, for the case where there are twoavailable samples, no additional “copy” operation is required, and thefixed default value is directly used to fill the prediction valuecorresponding to the colour component to be predicted. That is, when thenumber of the available samples is 2, the model parameter a may be setto 0, and the model parameter β may also be set to the preset componentvalue corresponding to the colour component to be predicted. Assumingthat the colour component to be predicted is a chroma component, theprediction values Pred_(C) [i, j] corresponding to the chroma componentsof all the samples in the current coding block can be filled with thepreset component value, i.e., the default value of the chromacomponents.

In this way, in the solutions of the prior art, when the number of theavailable samples is 2, in order to use the same processing module, anadditional “copy” operation is required to obtain four samples. Thus,the model parameters can be derived according to the same operationprocess as when the number of the available samples is 4, and anadditional “copy” operation is added. Moreover, the four samplesobtained still need four comparisons and four averaging calculations,which results in higher computational complexity. However, in theembodiments of this disclosure, the processing when the number of theavailable samples is 2 is aligned with the processing when the number ofthe available samples is 0. In this case, the same processing module canbe used without adding an additional operation, thereby reducing thecomputational complexity.

Referring to FIG. 10, FIG. 10 is a schematic flowchart of modelparameter derivation according to an embodiment of this disclosure. InFIG. 10, assuming that the colour component to be predicted is a chromacomponent. Firstly, neighbouring reference samples are obtained from aselection region to form a first neighbouring reference sample set.Then, the number of available samples in the first neighbouringreference sample set is judged. When the number of the available samplesis greater than or equal to 4, the first reference sample set isscreened to obtain a second reference sample set, and then the number ofavailable samples in the second neighbouring reference sample set isjudged. When the number of the available samples in the first referencesample set or the second reference sample set is 0, the model parameterα is set to 0, the model parameter β is set to the default value, andthe prediction value corresponding to the chroma component is filledwith the default value. When the number of the available samples in thefirst reference sample set or the second reference sample set is 2, theprocessing step is the same as the processing step when the number ofthe available samples is 0. Moreover, when the number of the availablesamples in the second reference sample set is 4, two samples havinglarger chroma component values and two samples having smaller chromacomponent values are obtained first through four comparisons, and thentwo average points are obtained. The model parameters α and β arederived based on the two average points, and the prediction processingof the chroma component is performed according to the constructedprediction model. In this way, only the coding block in which the numberof the available samples in the second reference sample set is 4 canperform the model parameter derivations in a CCLM mode. For the codingblock in which the number of the available samples is less than 4, anapproach of filling with a default value is directly used. Therefore,the computational complexity when the number of reference samples in theselection region is less than 4 can be reduced, and the coding anddecoding performance can be maintained basically unchanged.

In the embodiments of this disclosure, the unification of the modelparameter derivation processes is implemented. That is, for the numberof the available samples, used for model parameter derivation, in thefirst reference sample set, when the number of the available samples inthe first reference sample set is greater than or equal to the presetnumber, the available samples in the first reference sample set arescreened to obtain the second reference sample set, and then the numberof the available samples in the second neighbouring reference sample setis determined. When the number of the available samples in the secondreference sample set meets the preset number, the current coding blockrequires the model parameter derivation under the CCLM mode and the stepof constructing the prediction model. When the number of the availablesamples in the first reference sample set or the second reference sampleset is less than the preset number, for the current coding block, theprediction value corresponding to the colour component to be predictedof the coding block may be filled with the default value. Therefore, theembodiments of this disclosure may further provide a simplified flow ofmodel parameter derivation, as shown in FIG. 11.

Compared with FIG. 10, the model parameter derivation process shown inFIG. 11 is leaner. In FIG. 11, assuming that the colour component to bepredicted is a chroma component, and the preset component value is 512.Firstly, neighbouring reference samples are obtained from a selectionregion to form a first neighbouring reference sample set. Then, thenumber of available samples in the first neighbouring reference sampleset is judged. When the number of the available samples in the firstreference sample set is greater than or equal to the preset number, thefirst reference sample set is screened to obtain a second referencesample set, and then the number of available samples in the secondneighbouring reference sample set is judged. When the number of theavailable samples in the first reference sample set or the secondreference sample set is less than the preset number, the model parameterα is set to 0, the model parameter β is set to 512, and the predictionvalue corresponding to the chroma component is filled with 512. When thenumber of the available samples in the second reference sample set meetsthe preset number, two samples having larger chroma component values andtwo samples having smaller chroma component values are obtained firstthrough four comparisons, and then two average points are obtained. Themodel parameters α and β are derived based on the two average points,and the prediction processing of the chroma component is performedaccording to the constructed prediction model. It is to be noted thatonly the coding block in which the number of the available samples inthe second reference sample set meet the preset number can perform themodel parameter derivation in the CCLM mode. For the coding block inwhich the number of the available samples is less than the presetnumber, an approach of filling with a default value is directly used.Therefore, the computational complexity when the number of referencesamples in the selection region is less than the preset number can bereduced, and the coding and decoding performance can be maintainedbasically unchanged. Generally, the preset number in the embodiments ofthis disclosure may be 4.

Further, in the embodiments of this disclosure, the number of theavailable samples in the first reference sample set can be determinedaccording to the number of available samples in the selection regions.Therefore, the embodiments of this disclosure may provide anothersimplified flow of model parameter derivation, as shown in FIG. 12.

In FIG. 12, assuming that the colour component to be predicted is achroma component, and the preset component value is 512. Firstly, aselection region is determined so as to obtain a first reference sampleset. Then, the number of available samples in the first reference sampleset is determined. When the number of the available samples in the firstreference sample set is greater than or equal to the preset number, thefirst reference sample set is screened to obtain a second referencesample set, and then the number of available samples in the secondneighbouring reference sample set is determined. When the number of theavailable samples in the first reference sample set or the secondreference sample set is less than the preset number, the predictionvalue corresponding to the chroma component is filled with 512. When thenumber of the available samples in the second reference sample set meetsthe preset number, two samples having larger chroma component values andtwo samples having smaller chroma component values are obtained firstthrough four comparisons, and then two average points are obtained. Themodel parameters α and β are derived based on the two average points,and the prediction processing of the chroma component is performedaccording to the constructed prediction model. In this way, only thecoding block in which the number of the available samples in the secondreference sample set meet the preset number can perform the modelparameter derivation in the CCLM mode. For the coding block in which thenumber of the available samples is less than the preset number, anapproach of filling with a default value is directly used. Therefore,the computational complexity when the number of reference samples in theselection region is less than the preset number can be reduced, and thecoding and decoding performance can be maintained basically unchanged.Generally, the preset number in the embodiments of this disclosure maybe 4.

Further, in some embodiments, VVC defines two variables, i.e., numSampLand numSampT. The variable numSampL represents the total number of thesamples in the selection region H′, and the variable numSampT representsthe total number of the samples in the selection region W′:

for the INTRA_LT_CCLM mode, numSampT=W and numSampL=H;

for the INTRA_L_CCLM mode, numSampT=0 and numSampL=min{W+H, H+H}; and

for the INTRA_T_CCLM mode, numSampT=min{W+H, W+W} and numSampL=0.

Besides, it is also necessary to consider the availableness of theselection regions (or neighbouring regions), that is, the variablesnumSampL and numSampT only represent the number of the available samplesin the above-mentioned ranges.

In addition, VVC further defines that when the variables numSampL andnumSampT are both 0 (in this case, the number of available samples thatcan be chosen for model parameter derivation is 0), the prediction valuecorresponding to the chroma component is directly set to the defaultvalue; otherwise, the model parameter derivation needs to be performed.The details are shown as follows.

If (numSampL−0 && numSampT−0)

the prediction value corresponding to the chroma component is set to thedefault value;

else

the model parameter derivation is performed, and the chroma component ispredicted by using the constructed prediction model so as to obtain theprediction value corresponding to the chroma component.

However, since the sum of numSampL and numSampT can represent the totalnumber of the samples in the selection region, when numSampL+numSampT=0,zero available sample will be generated. When numSampL+numSampT=2, twoavailable samples will be generated. When numSampL+numSampT>4, fouravailable samples will be generated. Therefore, the embodiments of thisdisclosure can be further expressed as follows (where the preset numbermay be 4).

If (numSampL+numSampT<the preset number)

the prediction value corresponding to the chroma component is set to thedefault value;

else

the model parameter derivation is performed, and the chroma component ispredicted by using the constructed prediction model so as to obtain theprediction value corresponding to the chroma component.

This embodiment provides a method for a colour component prediction. Afirst reference sample set corresponding to a colour component to bepredicted of a coding block in a video picture is acquired; when thenumber of available samples in the first reference sample set is lessthan a preset number, a preset component value is taken as a predictionvalue corresponding to the colour component to be predicted; when thenumber of the available samples in the first reference sample set isgreater than or equal to the preset number, the first reference sampleset is screened to obtain a second reference sample set, where thenumber of available samples in the second reference sample set is lessthan or equal to the preset number; when the number of the availablesamples in the second reference sample set is less than the presetnumber, the preset component value is taken as the prediction valuecorresponding to the colour component to be predicted; and when thenumber of the available samples in the second reference sample set isequal to the preset number, a model parameter is determined through thesecond reference sample set, and a prediction model corresponding to thecolour component to be predicted is obtained according to the modelparameter, where the prediction model is used to implement predictionprocessing of the colour component to be predicted to obtain theprediction value corresponding to the colour component to be predicted.In this way, model parameter derivation processes are unified withoutchanging the coding and decoding prediction performance. In addition,for the case where the number of available samples in the neighbouringreference sample set is less than the preset number, especially for acase where there is zero or two available samples, since no additionalprocessing module is added, no additional processing is required, andthe computational complexity is also reduced.

In another embodiment of this disclosure, for the case where the numberof the available samples in the first reference sample set is less thanthe preset number, the CCLM mode may be directly disabled, and thepreset component value is taken as the prediction value corresponding tothe colour component to be predicted. Further, in some embodiments,after screening the first reference sample set to obtain the secondreference sample set, the method may further include that:

when the number of the available samples in the first reference sampleset is less than the preset number or the number of the availablesamples in the second reference sample set is less than the presetnumber, the preset component value is taken as the prediction valuecorresponding to the colour component to be predicted; and

when the number of the available samples in the second reference sampleset is greater than or equal to the preset number, a CCLM mode is usedto implement the prediction processing of the colour component to bepredicted.

It is to be noted that, for the case where the number of the availablesamples in the first reference sample set or the second reference sampleset is less than the preset number, the CCLM mode can be disabled, forexample, an identification of whether to use the CCLM mode is set to“disable the CCLM mode”. In this case, the prediction valuecorresponding to the colour component to be predicted is directly filledwith the default value. Only when the number of the available samples inthe second reference sample set is greater than or equal to the presetnumber, the CCLM mode can be used, for example, the identification ofwhether to use the CCLM mode is set to “enable the CCLM mode”. In thiscase, the prediction processing of the colour component to be predictedcan be implemented through the CCLM mode.

It is also to be noted that assuming that the colour component to bepredicted is a chroma component, and the preset number is 4, for allcases where two available samples may be generated (where the judgmentapproach for generating two available samples is not specificallylimited in the embodiments of this disclosure), the model parameter αmay also be set to 0, and the model parameter β may also set to anintermediate value (also referred to as a default value) correspondingto the chroma component. Therefore, the prediction values correspondingto the chroma components of all samples in the coding block can befilled with the default value. Furthermore, for all the cases where twoavailable samples may be generated, both numSampL and numSampT can alsobe set to 0, and therefore, the prediction values corresponding to thechroma components of all the samples in the coding block can be filledwith the default value.

In addition, for all the cases where two available samples may begenerated, the prediction values corresponding to the chroma componentscan be directly filled with the default value. Alternatively, for allthe cases where two available samples may be generated, the CCLM modecan be disabled. Alternatively, for all cases where two or zeroavailable sample may be generated, the CCLM mode can be disabled.Alternatively, for all the cases where two or zero available sample maybe generated, the prediction values corresponding to the chromacomponents can be directly filled with the default value.

In this way, in a case where the number of available samples used forthe model parameter derivation is different, the unification of themodel parameter derivation processes is implemented. Specifically, whenthe number of the available samples is 2, no additional processing isrequired, the existing processing module is directly invoked (i.e., theprocessing when the number of the available samples is 2 is aligned withthe processing when the number of the available samples is 0), therebyreducing the computational complexity.

According to the method for the colour component prediction in theembodiments of this disclosure, based on the latest VVC referencesoftware VTM5.0, in All intra conditions, for a test sequence requiredby JVET, according to general test conditions, BD-rate average changesin a Y component, a Cb component and a Cr component are 0.00%, 0.02%,and 0.02%, respectively, which indicate that this disclosure has littleimpact on the coding and decoding performance.

Without affecting the coding and decoding performance, this disclosuremay achieve the following beneficial effects.

Firstly, the model parameter derivation processes in the CCLM can beunified in this disclosure. In the solutions of the prior art, for thecase where the number of the available samples is 2, an additional“copy” operation needs to be performed to generate four availablesamples, so that the same operations as in the case of four availablesamples can be performed to complete the model parameter derivation.However, in this disclosure, the additional “copy” operation can beeliminated, and the processing when the number of the available samplesis 2 is aligned with the processing when the number of the availablesamples is 0. In this case, the same processing module can be directlyused without adding an additional operation, so that the unification ofthe linear model parameter derivation processes can be implemented.

Secondly, this disclosure can also reduce the computational complexitywhen there are two available samples used for model parameter derivationin the CCLM mode. In the solutions of the prior art, for the case wherethe number of the available samples is 2, not only an additional “copy”operation needs to be performed to generate four available samples, butalso the same operations as in the case of four available samples, i.e.,a series of operations such as four comparisons, four averagingcalculations, model parameter calculation, and prediction modelconstruction, need to be executed. However, this disclosure caneliminate these operations and directly fill all the prediction valuesPred_(C) [i,j] corresponding to the chroma components of all samples inthe current coding block with the preset component value, i.e., thedefault value of the chroma components, without affecting the coding anddecoding performance.

This embodiment provides a method for a colour component prediction.Through the technical solution of this embodiment, the number ofavailable samples in a first reference sample set is compared with apreset number. When the number of the available samples in the firstreference sample set or a second reference sample set is less than thepreset number, a preset default value is directly taken as a predictionvalue corresponding to a colour component to be predicted. Only when thenumber of the available samples in the second reference sample set isgreater than or equal to the preset number, model parameters aredetermined according to the first reference sample set so as toconstruct a prediction model of the colour component to be predicted,thereby unifying model parameter derivation processes. In addition, forthe case where the number of the available samples in the firstreference sample set is less than the preset number, since no additionalprocessing module is added, the computational complexity is alsoreduced.

Based on the same inventive concept as the foregoing embodiments,referring to FIG. 13, FIG. 13 is a schematic structural compositiondiagram of a colour component prediction device 130 according to anembodiment of this disclosure. The colour component prediction device130 may include an acquisition unit 1301, a prediction unit 1302, and ascreening unit 1303.

The acquisition unit 1301 is configured to acquire a first referencesample set corresponding to a colour component to be predicted of acoding block in a video picture.

The prediction unit 1302 is configured to take, when the number ofavailable samples in the first reference sample set is less than apreset number, a preset component value as a prediction valuecorresponding to the colour component to be predicted.

The screening unit 1303 is configured to screen, when the number of theavailable samples in the first reference sample set is greater than orequal to the preset number, the first reference sample set to obtain asecond reference sample set. The number of available samples in thesecond reference sample set is less than or equal to the preset number.

The prediction unit 1302 is further configured to: when the number ofthe available samples in the second reference sample set is less thanthe preset number, take the preset component value as the predictionvalue corresponding to the colour component to be predicted; and whenthe number of the available samples in the second reference sample setis equal to the preset number, determine a model parameter through thesecond reference sample set, and obtain a prediction model correspondingto the colour component to be predicted according to the modelparameter. The prediction model is used to implement predictionprocessing of the colour component to be predicted to obtain theprediction value corresponding to the colour component to be predicted.

In the foregoing solution, the acquisition unit 1301 is specificallyconfigured to: acquire reference samples neighboring at least one sideof the coding block, where the at least one side includes a left side ofthe coding block and/or a top side of the coding block; and form thefirst reference sample set corresponding to the colour component to bepredicted based on the reference samples.

In the foregoing solution, the acquisition unit 1301 is specificallyconfigured to: acquire reference samples in a reference row or areference column neighboring the coding block, where the reference rowconsists of a row neighboring a top side and a top-right side of thecoding block, and the reference column consists of a column neighboringa left side and a bottom-left side of the coding block; and based on thereference samples, form the first reference sample set corresponding tothe colour component to be predicted.

In the foregoing solution, the screening unit 1303 is specificallyconfigured to: based on sample positions and colour component strengthscorresponding to neighbouring reference samples in the first referencesample set, determine positions of samples to be selected; and accordingto the determined positions of samples to be selected, choose, from thefirst reference sample set, available samples corresponding to thepositions of the sample to be selected, and combine the chosen availablesamples into the second reference sample set. The number of theavailable samples in the second reference sample set is less than orequal to the preset number.

In the foregoing solution, referring to FIG. 13, the colour componentprediction device 130 may further include a determination unit 1304,which is configured to: based on bit information of the video picture,determine a preset component range corresponding to the colour componentto be predicted; and determine an intermediate value of the presetcomponent range according to the preset component range, and take theintermediate value as the prediction value corresponding to the colourcomponent to be predicted. The intermediate value is expressed as thepreset component value.

In the foregoing solution, referring to FIG. 13, the colour componentprediction device 130 may further include a filling unit 1305, which isconfigured to use, for each sample in the coding block, the presetcomponent value to perform prediction value filling on the colourcomponent to be predicted of each sample.

In the foregoing solution, the prediction unit 1302 is furtherconfigured to perform prediction processing on the colour component tobe predicted of each sample in the coding block based on the predictionmodel, to obtain the prediction value corresponding to the colourcomponent to be predicted of each sample.

In the foregoing solution, the value of the preset number is 4. Theprediction unit 1302 is further configured to take, when the number ofthe available samples in the first reference sample set is 0 or 2, thepreset component value as the prediction value corresponding to thecolour component to be predicted.

Accordingly, the prediction unit 1302 is further configured to take,when the number of the available samples in the second reference sampleset is 0 or 2, the preset component value as the prediction valuecorresponding to the colour component to be predicted.

In the foregoing solution, referring to FIG. 13, the colour componentprediction device 130 may further include a judgment unit 1306, which isconfigured to: when the number of the available samples in the firstreference sample set is less than the preset number or the number of theavailable samples in the second reference sample set is less than thepreset number, take the preset component value as the prediction valuecorresponding to the colour component to be predicted; and when thenumber of the available samples in the second reference sample set isgreater than or equal to the preset number, use a CCLM mode to implementthe prediction processing of the colour component to be predicted.

It is to be understood that in this embodiment, a “unit” may be a partof a circuit, a part of a processor, a part of a program or software,etc., and certainly, it may also be a module, or it may be non-modular.Moreover, the components in this embodiment may be integrated into oneprocessing unit, or each of the units may exist alone physically, or twoor more units may be integrated into one unit. The integrated unit maybe implemented in the form of hardware, or may be implemented in a formof a software functional module.

When being realized in form of software functional unit and sold or usedas an independent product, the integrated unit may also be stored in acomputer-readable storage medium. Based on such an understanding, thetechnical solutions of this disclosure substantially or parts makingcontributions to the conventional art or part of the technical solutionsmay be embodied in form of software product, and the computer softwareproduct is stored in a storage medium, including multiple instructionsconfigured to enable a computer device (which may be a personalcomputer, a server, a network device or the like) or a processor toexecute all or part of the steps of the method in each embodiment of theapplication. The foregoing storage medium includes: various mediacapable of storing program codes such as a U disk, a mobile hard disk, aRead Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk,or an optical disk.

Therefore, this embodiment provides a computer storage medium, having acolour component prediction program stored thereon. The colour componentprediction program implements the steps of the method according to anyone of the foregoing embodiments when executed by at least oneprocessor.

Based on the components of the foregoing colour component predictiondevice 130 and the computer storage medium, referring to FIG. 14, thespecific hardware structure of the colour component prediction device130 provided by the embodiments of this disclosure shown therein mayinclude a network interface 1401, a memory 1402, and a processor 1403.The components are coupled together through a bus system 1404. It is tobe understood that the bus system 1404 is configured to implementconnection and communication between the components. In addition to adata bus, the bus system 1404 further includes a power bus, a controlbus, and a status signal bus. However, for ease of clear description,all types of buses are marked as the bus system 1404 in FIG. 14. Thenetwork interface 1401 is configured to receive and send a signal duringa process of receiving or sending information from or to other externalnetwork elements.

The memory 1402 is configured to store a computer program capable ofrunning on the processor 1403.

The processor 1403 is configured to execute, when running the computerprogram, the following operations:

acquiring a first reference sample set corresponding to a colourcomponent to be predicted of a coding block in a video picture;

when the number of available samples in the first reference sample setis less than a preset number, taking a preset component value as aprediction value corresponding to the colour component to be predicted;

when the number of the available samples in the first reference sampleset is greater than or equal to the preset number, screening the firstreference sample set to obtain a second reference sample set, where thenumber of available samples in the second reference sample set is lessthan or equal to the preset number;

when the number of the available samples in the second reference sampleset is less than the preset number, taking the preset component value asthe prediction value corresponding to the colour component to bepredicted; and

when the number of the available samples in the second reference sampleset is equal to the preset number, determining a model parameter throughthe second reference sample set, and obtaining a prediction modelcorresponding to the colour component to be predicted according to themodel parameter, where the prediction model is used to implementprediction processing of the colour component to be predicted to obtainthe prediction value corresponding to the colour component to bepredicted.

It is to be understood that the memory 1402 in the embodiments of thisdisclosure may be a volatile memory or a non-volatile memory, or mayinclude both a volatile memory and a non-volatile memory. Thenon-volatile memory may be a Read-Only Memory (ROM), a Programmable ROM(PROM), an Erasable PROM (EPROM), an electrically programmable ROM(EPROM), an Electrically EPROM (EEPROM), or a flash memory. The volatilememory may be a Random Access Memory (RAM), which is used as an externalcache. By way of exemplary rather than restrictive description, RAMs inmany forms may be used, such as a Static RAM (SRAM), a Dynamic RAM(DRAM), a Synchronous DRAM (SDRAM), a Double Data Rate SDRAM (DDRSDRAM),an Enhanced SDRAM (ESDRAM), a Synchlink DRAM (SLDRAM), and a DirectRambus RAM (DRRAM). The memory 1402 in a system and the method that aredescribed therein is intended to include, but is not limited to, thesememories and any other proper types of memories.

The processor 1403 may be an integrated circuit chip having a signalprocessing capability. In an implementation process, the steps in theforegoing method may be completed by using a hardware integrated logiccircuit in the processor 1403, or by using instructions in the form ofsoftware. The processor 1403 may be a general-purpose, a Digital SignalProcessor (DSP), an Application Specific Integrated Circuit (ASIC), aField Programmable Gate Array (FPGA) or another programmable logicdevice, a discrete gate or a transistor logic device, or a discretehardware component. All the methods, steps, and logical block diagramsdisclosed in the embodiments of this disclosure may be implemented orperformed. The general purpose processor may be a microprocessor or theprocessor may also be any conventional processor, or the like. The stepsof the methods disclosed in the embodiments of this disclosure may bedirectly completed by a hardware decoding processor, or may be completedby using a combination of hardware in a decoding processor and asoftware module. The software module may be located in a mature storagemedium in the art, such as a RAM, a flash memory, a ROM, a PROM, anEEPROM, or a register. The storage medium is located in the memory 1402,and the processor 1403 reads information in the memory 1402 andcompletes the steps in the methods in combination with hardware thereof

It is to be understood that these embodiments described therein may beimplemented by using hardware, software, firmware, middleware,microcode, or any combination thereof. For hardware implementation, theprocessing unit may be implemented in one or more Application SpecificIntegrated Circuits (ASICs), DSPs, DSP Devices (DSPDs), ProgrammableLogic Devices (PLDs), Field-Programmable Gate Arrays (FPGAs),general-purpose processors, controllers, microcontrollers,microprocessors, other electronic units configured to execute theforegoing functions of this disclosure or the combination thereof.

For software implementation, the technologies set forth herein may beimplemented by using modules (such as processes and functions) forexecuting the functions set forth therein. Software codes may be storedin a memory and executed by a processor. The memory may be implementedin the processor or outside the processor.

Optionally, as another embodiment, the processor 1403 is furtherconfigured to execute, when running the computer program, the methodaccording to any one of the foregoing embodiments.

Referring to FIG. 15, FIG. 15 is a schematic structural compositiondiagram of an encoder according to an embodiment of this disclosure. Asshown in FIG. 15, the encoder 150 may at least include the colourcomponent prediction device 130 according to any one of the foregoingembodiments.

Referring to FIG. 16, FIG. 16 is a schematic structural compositiondiagram of a decoder according to an embodiment of this disclosure. Asshown in FIG. 16, the decoder 160 may at least include the colourcomponent prediction device 130 according to any one of the foregoingembodiments.

It is to be noted that, in this disclosure, the terms “comprise”,“include” or any other variations are intended to cover non-exclusivelyincluding so that any process, method, article or device that includes aseries of elements includes not only such elements, but also includeother elements that are not explicitly listed, or also includesintrinsic elements of such process, method, article or device. Withoutmore limitations, elements defined by the phrase “include a . . . ” donot rule out that there are other same elements in the process, method,article or device which include said elements.

The sequence numbers of the foregoing embodiments of this disclosure aremerely for description purpose but do not imply the preference among theembodiments.

The methods disclosed in the several method embodiments provided in thisdisclosure can be combined arbitrarily without conflicts to obtain newmethod embodiments.

The features disclosed in the several product embodiments provided inthis disclosure can be combined arbitrarily without conflicts to obtainnew product embodiments.

The features disclosed in the several method or device embodimentsprovided in this disclosure can be combined arbitrarily withoutconflicts to obtain new method embodiments or device embodiments.

The above is only the specific implementation mode of this disclosureand not intended to limit the scope of protection of this disclosure.Any variations or replacements apparent to those skilled in the artwithin the technical scope disclosed by this disclosure shall fallwithin the scope of protection of this disclosure. Therefore, the scopeof protection of this disclosure shall be subject to the scope ofprotection of the claims.

INDUSTRIAL APPLICABILITY

In the embodiments of this disclosure, a first reference sample setcorresponding to a colour component to be predicted of a coding block ina video picture is acquired; when the number of available samples in thefirst reference sample set is less than a preset number, a presetcomponent value is taken as a prediction value corresponding to thecolour component to be predicted; when the number of the availablesamples in the first reference sample set is greater than or equal tothe preset number, the first reference sample set is screened to obtaina second reference sample set, where the number of available samples inthe second reference sample set is less than or equal to the presetnumber; when the number of the available samples in the second referencesample set is less than the preset number, the preset component value istaken as the prediction value corresponding to the colour component tobe predicted; and when the number of the available samples in the secondreference sample set is equal to the preset number, a model parameter isdetermined through the second reference sample set, and according to themodel parameter, a prediction model corresponding to the colourcomponent to be predicted is obtained, where the prediction model isused to implement prediction processing of the colour component to bepredicted to obtain the prediction value corresponding to the colourcomponent to be predicted. In this way, when the number of the availablesamples in the first reference sample set is less than the preset numberor the number of the available samples in the second reference sampleset is less than the preset number, a preset default value is directlytaken as the prediction value corresponding to the colour component tobe predicted. Only when the number of the available samples in thesecond reference sample set meets the preset number, the model parameteris determined according to the first reference sample set to establishthe prediction model for the colour component to be predicted, therebyunifying model parameter derivation processes. Moreover, for the casewhere the number of the available samples in the first reference sampleset or the second reference sample set is less than the preset number,especially for the case where there is zero or two available samples,since no additional processing module is added, the preset default valueis directly taken as the prediction value corresponding to the colourcomponent to be predicted, so that no additional processing is required,and the computational complexity is also reduced.

1. A method for a colour component prediction, applied to decoder,comprising: acquiring a first reference sample set corresponding to acolour component to be predicted of a coding block in a video picture;when a number of available samples in the first reference sample set isequal to 0, taking a preset component value as a prediction valuecorresponding to the colour component to be predicted; and when a numberof the available samples in the first reference sample set is greaterthan or equal to 4, processing the first reference sample set to obtaina second reference sample set, wherein a number of available samples inthe second reference sample set is less than or equal to a presetnumber; when the number of the available samples in the second referencesample set is equal to the preset number, determining a model parameterthrough the second reference sample set, and obtaining a predictionmodel corresponding to the colour component to be predicted according tothe model parameter, wherein the prediction model is used to implement aprediction processing of the colour component to be predicted to obtaina prediction value corresponding to the colour component to bepredicted.
 2. The method of claim 1, wherein the preset number is
 4. 3.The method of claim 1, wherein the acquiring the first reference sampleset corresponding to the colour component to be predicted of the codingblock in the video picture comprises: acquiring reference samplesneighboring at least one side of the coding block, wherein the at leastone side comprises a left side of the coding block and/or a top side ofthe coding block; and determining the first reference sample setcorresponding to the colour component to be predicted based on thereference samples.
 4. The method of claim 1, wherein the acquiring thefirst reference sample set corresponding to the colour component to bepredicted of the coding block in the video picture comprises: acquiringreference samples in a reference row and/or a reference columnneighboring the coding block, wherein the reference row consists of arow neighboring a top side and a top-right side of the coding block, andthe reference column consists of a column neighboring a left side and abottom-left side of the coding block; and determining the firstreference sample set corresponding to the colour component to bepredicted based on the reference samples.
 5. The method of claim 1,wherein processing the first reference sample set comprises: screeningthe first reference sample set.
 6. The method of claim 5, wherein thescreening the first reference sample set to obtain the second referencesample set comprises: determining positions of samples to be selectedbased on sample positions corresponding to neighbouring referencesamples in the first reference sample set; and choosing, from the firstreference sample set, available samples corresponding to the positionsof the samples to be selected according to the determined positions ofthe samples to be selected, and determining the second reference sampleset based on the chosen available samples, wherein the number of theavailable samples in the second reference sample set is less than orequal to the preset number.
 7. The method of claim 1, wherein the takingthe preset component value as the prediction value corresponding to thecolour component to be predicted comprises: determining the presetcomponent value based on a bit depth of the video picture; wherein thepreset component value is 1<<(BitDepth−1), and the BitDepth is a bitdepth of the colour component to be predicted.
 8. The method of claim 1,wherein the method further comprises: for each sample in the codingblock, performing prediction value filling on the colour component to bepredicted of each sample by using the preset component value.
 9. Themethod of claim 1, wherein after obtaining the prediction modelcorresponding to the colour component to be predicted according to themodel parameter, the method further comprises: performing a predictionprocessing on the colour component to be predicted of each sample in thecoding block based on the prediction model, to obtain a prediction valuecorresponding to a colour component to be predicted of each sample. 10.A method for a colour component prediction, applied to encoder,comprising: acquiring a first reference sample set corresponding to acolour component to be predicted of a coding block in a video picture;when a number of available samples in the first reference sample set isequal to 0, taking a preset component value as a prediction valuecorresponding to the colour component to be predicted; and when a numberof the available samples in the first reference sample set is greaterthan or equal to 4, processing the first reference sample set to obtaina second reference sample set, wherein a number of available samples inthe second reference sample set is less than or equal to a presetnumber; when the number of the available samples in the second referencesample set is equal to the preset number, determining a model parameterthrough the second reference sample set, and obtaining a predictionmodel corresponding to the colour component to be predicted according tothe model parameter, wherein the prediction model is used to implement aprediction processing of the colour component to be predicted to obtaina prediction value corresponding to the colour component to bepredicted.
 11. The method of claim 10, wherein the preset number is 4.12. The method of claim 10, wherein the acquiring the first referencesample set corresponding to the colour component to be predicted of thecoding block in the video picture comprises: acquiring reference samplesneighboring at least one side of the coding block, wherein the at leastone side comprises a left side of the coding block and/or a top side ofthe coding block; and determining the first reference sample setcorresponding to the colour component to be predicted based on thereference samples.
 13. The method of claim 10, wherein the acquiring thefirst reference sample set corresponding to the colour component to bepredicted of the coding block in the video picture comprises: acquiringreference samples in a reference row and/or a reference columnneighboring the coding block, wherein the reference row consists of arow neighboring a top side and a top-right side of the coding block, andthe reference column consists of a column neighboring a left side and abottom-left side of the coding block; and determining the firstreference sample set corresponding to the colour component to bepredicted based on the reference samples.
 14. The method of claim 10,wherein processing the first reference sample set comprises: screeningthe first reference sample set.
 15. The method of claim 14, wherein thescreening the first reference sample set to obtain the second referencesample set comprises: determining positions of samples to be selectedbased on sample positions corresponding to neighbouring referencesamples in the first reference sample set; and choosing, from the firstreference sample set, available samples corresponding to the positionsof the samples to be selected according to the determined positions ofthe samples to be selected, and determining the second reference sampleset based on the chosen available samples, wherein the number of theavailable samples in the second reference sample set is less than orequal to the preset number.
 16. The method of claim 10, wherein thetaking the preset component value as the prediction value correspondingto the colour component to be predicted comprises: determining thepreset component value based on a bit depth of the video picture;wherein the preset component value is 1<<(BitDepth−1), and the BitDepthis a bit depth of the colour component to be predicted.
 17. The methodof claim 10, wherein the method further comprises: for each sample inthe coding block, performing prediction value filling on the colourcomponent to be predicted of each sample by using the preset componentvalue.
 18. The method of claim 10, wherein after obtaining theprediction model corresponding to the colour component to be predictedaccording to the model parameter, the method further comprises:performing a prediction processing on the colour component to bepredicted of each sample in the coding block based on the predictionmodel, to obtain a prediction value corresponding to a colour componentto be predicted of each sample.
 19. A decoder, comprising a processorand a memory configured to store a computer program capable of runningon the processor, wherein the processor is configured to: acquire afirst reference sample set corresponding to a colour component to bepredicted of a coding block in a video picture; when a number ofavailable samples in the first reference sample set is equal to 0, takea preset component value as a prediction value corresponding to thecolour component to be predicted; when the number of the availablesamples in the first reference sample set is greater than or equal to 4,process the first reference sample set to obtain a second referencesample set, wherein a number of available samples in the secondreference sample set is less than or equal to a preset number; and whenthe number of the available samples in the second reference sample setis equal to the preset number, determine a model parameter through thesecond reference sample set, and obtain a prediction model correspondingto the colour component to be predicted according to the modelparameter, wherein the prediction model is used to implement aprediction processing of the colour component to be predicted to obtaina prediction value corresponding to the colour component to bepredicted.
 20. An encoder, comprising a processor and a memoryconfigured to store a computer program capable of running on theprocessor, wherein the processor is configured to: acquire a firstreference sample set corresponding to a colour component to be predictedof a coding block in a video picture; when a number of available samplesin the first reference sample set is equal to 0, take a preset componentvalue as a prediction value corresponding to the colour component to bepredicted; when the number of the available samples in the firstreference sample set is greater than or equal to 4, process the firstreference sample set to obtain a second reference sample set, wherein anumber of available samples in the second reference sample set is lessthan or equal to a preset number; and when the number of the availablesamples in the second reference sample set is equal to the presetnumber, determine a model parameter through the second reference sampleset, and obtain a prediction model corresponding to the colour componentto be predicted according to the model parameter, wherein the predictionmodel is used to implement a prediction processing of the colourcomponent to be predicted to obtain a prediction value corresponding tothe colour component to be predicted.